<comment>
  # 广告轮播图
</comment>
<template>
  <div class="yoyo-advert-container">
    <el-carousel indicator-position="outside">
      <el-carousel-item v-for="item in picture" :key="item.name">
        <img :src="item.url" alt="" style="width: 100%; height: 100%;">
      </el-carousel-item>
    </el-carousel>
  </div>
</template>

<script>
import picture1 from '../assets/image/1.png'
import picture2 from '../assets/image/2.png'
import picture3 from '../assets/image/3.png'
import picture4 from '../assets/image/4.png'
import picture5 from '../assets/image/5.png'
import picture6 from '../assets/image/6.png'

export default {
  name: 'advert',
  data(){
    return{
      picture: [
        {name: 'picture1', url: picture1},
        {name: 'picture2', url: picture2},
        {name: 'picture3', url: picture3},
        {name: 'picture4', url: picture4},
        {name: 'picture5', url: picture5},
        {name: 'picture6', url: picture6},
      ]
    }
  }

}
</script>

<style lang="scss" scoped>
.yoyo-advert-container{
  width: 100%;
  height: 240px;
}
.el-carousel__item h3 {
  color: #475669;
  font-size: 18px;
  opacity: 0.75;
  line-height: 240px;
  margin: 0;
}

.el-carousel__item:nth-child(2n) {
  background-color: #99a9bf;
}

.el-carousel__item:nth-child(2n+1) {
  background-color: #d3dce6;
}
</style>
<style lang="scss">
.el-carousel__item{
  height: 260px;
}
.el-carousel__container {
  　　height: var(--carousel-height) !important;
}
</style>
